<template>
  <div class="swiper">
    <van-swipe :autoplay="3000" indicator-color="#blue">
      <van-swipe-item v-for="(image, index) in images" :key="index">
        <img :src="image" style="height:5rem;" />
      </van-swipe-item>
    </van-swipe>
  </div>
</template>

<script>
// import Vue from "vue"
// Vue.use(Swipe)
// import { Swipe, SwipeItem,Lazyload  } from 'vant';
//加载图片
// import img1 from '../../assets/image/1.jpg'
// import img2 from '../../assets/image/2.jpg'
import img3 from '../../assets/image/3.jpg'
import img4 from '../../assets/image/4.jpg'
export default {
  data() {
    return {
      images: [
        //图片

        img4,
        'https://gimg2.baidu.com/image_search/src=http%3A%2F%2F5b0988e595225.cdn.sohucs.com%2Fimages%2F20171201%2Fd49fc0b256e14106bdf5b18b3ac33076.jpeg&refer=http%3A%2F%2F5b0988e595225.cdn.sohucs.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1634995984&t=1f9bbe5a9256585b6030d5a6570641e3',

        'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fnimg.ws.126.net%2F%3Furl%3Dhttp%253A%252F%252Fdingyue.ws.126.net%252F2021%252F0923%252Fce0dc6f5j00qzvxau004od200u000mig00zk00qo.jpg%26thumbnail%3D650x2147483647%26quality%3D80%26type%3Djpg&refer=http%3A%2F%2Fnimg.ws.126.net&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1634995834&t=88741102f91df2637459a12d13ad858e',
        img3,
        'https://img0.baidu.com/it/u=151504279,2304874461&fm=15&fmt=auto',
        'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fn.sinaimg.cn%2Fsinakd2020621s%2F250%2Fw600h450%2F20200621%2Fdce2-ivffpct1657105.jpg&refer=http%3A%2F%2Fn.sinaimg.cn&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1634995834&t=7e754bf1c07d32efb15b0e2d900e5669',
      ],
    }
  },

  methods: {},

  components: {},
}
</script>

<style scoped>
.my-swipe .van-swipe-item {
  color: #fff;

  text-align: center;
  background-color: #39a9ed;
}
/* 轮播图包裹盒子 */
.swiper {
  height: 5rem;
  width: 100%;
  overflow: hidden;
}
/* 图片 */
.swiper img {
  height: 150px;
  width: 100%;
}
</style>
